<%@ taglib prefix="s" uri="/struts-tags" %>
<%--
  Created by IntelliJ IDEA.
  User: 高金磊
  Date: 2021/5/12
  Time: 8:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title></title>
    <link rel="icon" href="<%=basePath%>favicon.ico" type="image/ico">
    <link href="<%=basePath%>css/bootstrap.min.css" rel="stylesheet">
    <link href="<%=basePath%>css/fonts.css" rel="stylesheet">
    <link href="<%=basePath%>css/style.css" rel="stylesheet">
</head>
<body>
<s:action name="LoginRecord">

    <div class="row">

        <div class="col-lg-12">
            <div class="card">
                <div class="card-body">
                    <div class="table-responsive">
                        <h4>用户行为记录<a href=""><span class="badge"><s:property value="#request.data.size()"/> </span></a></h4>
                        最近一次登录:<span style="font-size: 12px;color: green"><s:property value="#request.userinfoEntity.formatLastLoginTime()"/></span><br>
                        注册时间:<span style="font-size: 12px;color:  #0FB25F"><s:property value="#request.userinfoEntity.formatRegisteTime()"/></span>
                        <table class="table table-hover">
                            <thead>
                            <tr>
                                <th>时间</th>
                                <th>事件</th>
                                <th></th>
                                <th>ip地址</th>
                                <th>地点</th>
                            </tr>
                            </thead>
                            <tbody>
                            <%--//时间,多久前,事件,ip地址,地点--%>
                            <s:iterator value="#request.data" var="data">
                                <tr>
                                    <td><s:property value="#data[0]"/> </td>
                                    <td><s:property value="#data[1]"/> </td>
                                    <td><s:property value="#data[2]"/> </td>
                                    <td><s:property value="#data[3]"/> </td>
                                    <td><s:property value="#data[4]"/> </td>

                                </tr>
                            </s:iterator>
                            </tbody>
                            <tfoot>

                            </tfoot>
                        </table>

                    </div>
                    <div align="center">
                        <h6>系统只保留180天内的记录</h6>
                    </div>

                </div>
            </div>
        </div>

    </div>

</s:action>
<br>
<br>
<br>
<br>
<br>

<script type="text/javascript" src="<%=basePath%>js/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/bootstrap.js"></script>
<script type="text/javascript" src="<%=basePath%>js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/main.min.js"></script>
<script type="text/javascript">
    $(function(){
        $('.search-bar .dropdown-menu a').click(function() {
            var field = $(this).data('field') || '';
            $('#search-field').val(field);
            $('#search-btn').html($(this).text() + ' <span class="caret"></span>');
        });
    });
</script>
</body>
</html>
